When we study a single random variable, like the height of a randomly chosen person, we use a probability density function (PDF) that tells us how likely different heights are. But what if we want to study two quantities at once—say, height and weight—and understand how they vary together? That's where the joint probability density function comes in. A joint PDF extends the idea of a single-variable PDF to two dimensions, assigning a probability density to every point in the plane. Instead of asking 'How likely is this height?' we can now ask 'How likely is this combination of height and weight?' This lets us capture relationships and dependencies between variables, not just their individual behaviors.

A joint PDF extends the single-variable PDF from a curve to a surface, describing probability density over pairs of values.
Probability for a region in the plane is the volume under the joint PDF surface over that region.

A joint probability density function (PDF) describes the probability distribution of two or more random variables simultaneously. Think of it as a surface floating above the plane formed by the axes of your variables. The height of this surface at any point (x, y) represents the probability density at that location—higher surfaces indicate regions where the variables are more likely to take on those values together. Like all PDFs, a joint PDF must be non-negative everywhere (no negative probabilities!) and the total volume under the entire surface must equal 1, representing certainty that the variables take on some values in their domain.

The joint PDF surface: height represents probability density, and the total volume under the surface equals 1.
Extracting marginal PDFs: slicing the joint surface along one axis and integrating out the other variable.

Independence between random variables is a special and important case. Two variables X and Y are independent if knowing the value of one gives no information about the other. Mathematically, this means the joint PDF factors into the product of the marginal PDFs: f(x, y) = f_X(x) · f_Y(y). Visually, an independent joint PDF surface looks like the product of two separate one-dimensional curves—one for X and one for Y—creating a surface with no 'twist' or correlation. If the variables are dependent, the joint PDF cannot be factored this way, and the shape of the surface will reflect the relationship between the variables.